<html>
	<head>
		<meta charset="utf-8"/>
		<title>BFont</title>
		<link rel="stylesheet" type="text/css" href="../style.css"/>
	</head>
	<body>
		<h1>BFont</h1>
		<p>Inherites from <a href="BObject.html">BObject</a></p>
		<h2>public</h2>
		<table id="public">
			<tr><td align="right">static void </td><td><a href="#AddPath(const BString&)">AddPath</a>(const BString& path);</td></tr>
			<tr><td align="right">static int </td><td><a href="#PathCount()">PathCount</a>();</td></tr>
			<tr><td align="right">static const BString& </td><td><a href="#Path(int)">Path</a>(int index);</td></tr>
			<tr><td align="right"/><td><a href="#BFont(int)">BFont</a>(int size = 20);</td></tr>
			<tr><td align="right"/><td><a href="#BFont(const BString&,int)">BFont</a>(const BString& family, int size = 20);</td></tr>
			<tr><td align="right"/><td><a href="#~BFont()">~BFont</a>();</td></tr>
			<tr><td align="right">void </td><td><a href="#setFamily(const BString&)">setFamily</a>(const BString& family);</td></tr>
			<tr><td align="right">const BString& </td><td><a href="#family()">family</a>() const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#setEncoding(Encoding)">setEncoding</a>(Encoding encoding);</td></tr>
			<tr><td align="right">Encoding </td><td><a href="#encoding()">encoding</a>() const;</td></tr>
			<tr><td align="right">int </td><td><a href="#encodingCount()">encodingCount</a>() const;</td></tr>
			<tr><td align="right">Encoding </td><td><a href="#encoding(int)">encoding</a>(int index) const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setSize(int)">setSize</a>(int size);</td></tr>
			<tr><td align="right">int </td><td><a href="#size()">size</a>() const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setBold(bool)">setBold</a>(bool enable);</td></tr>
			<tr><td align="right">bool </td><td><a href="#bold()">bold</a>() const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setItalic(bool)">setItalic</a>(bool enable);</td></tr>
			<tr><td align="right">bool </td><td><a href="#italic()">italic</a>() const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setUnderline(bool)">setUnderline</a>(bool enable);</td></tr>
			<tr><td align="right">bool </td><td><a href="#underline()">underline</a>() const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setSpaceSize(int)">setSpaceSize</a>(int spaceSize);</td></tr>
			<tr><td align="right">int </td><td><a href="#spaceSize()">spaceSize</a>() const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setTabSize(int)">setTabSize</a>(int tabSize);</td></tr>
			<tr><td align="right">int </td><td><a href="#tabSize()">tabSize</a>() const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setBitmap(BCode, BImage*)">setBitmap</a>(BCode code, BImage* bitmap);</td></tr>
			<tr><td align="right">BImage* </td><td><a href="#bitmap(BCode)">bitmap</a>(BCode code);</td></tr>
			<tr><td align="right">const BImage* </td><td><a href="#bitmap(BCode)">bitmap</a>(BCode code) const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setGlyph(BCode, BGlyph*)">setGlyph</a>(BCode code, BGlyph* glyph);</td></tr>
			<tr><td align="right">BGlyph* </td><td><a href="#glyph(BCode)">glyph</a>(BCode code);</td></tr>
			<tr><td align="right">const BGlyph* </td><td><a href="#glyph(BCode)">glyph</a>(BCode code) const;</td></tr>
			<tr><td align="right">BSize </td><td><a href="#codeSize(BCode)">codeSize</a>(BCode code) const;</td></tr>
			<tr><td align="right">int </td><td><a href="#codeWidth(BCode)">codeWidth</a>(BCode code) const;</td></tr>
			<tr><td align="right">int </td><td><a href="#codeHeight(BCode)">codeHeight</a>(BCode code) const;</td></tr>
			<tr><td align="right">BSize </td><td><a href="#textSize(const BString&)">textSize</a>(const BString& text) const;</td></tr>
		</table>
		<h2>protected</h2>
		<table id="protected"/>
		<div id="desc">
			<h2>Detailed Description : </h2>
			<p>Font has load from file such as ".ttf", ".otf".Each font has family, size and attributes. Font only use image but bitmap format. When a font is loading, font file path order will be local path set used BFont::AppPath() first, then find in the "font" folder of application's root path, if failed then find file in the folder of BWE install path, at last find the font file in system font folder.</p>
			<p>See also : </p>
		</div>
		<h2 id="docs">Member Function Documentation</h2>
		<div id="AddPath(const BString&)">
			<h3>static void AddPath(const BString& path);</h3>
			<p>Add a font location path, </p>
		</div>
		<div id="PathCount()">
			<h3>static int PathCount();</h3>
			<p>Get number of path added by BFont::AddPath().</p>
		</div>
		<div id="Path(int)">
			<h3>static const BString& Path(int index);</h3>
			<p>Get indexed path in in local path list.</p>
		</div>
		<div id="BFont(int)">
			<h3>BFont(int size = 20);</h3>
			<p>Constructs font with size.</p>
		</div>
		<div id="BFont(const BString&,int)">
			<h3>BFont(const BString& family, int size = 20);</h3>
			<p>Constructs font with family and size.</p>
		</div>
		<div id="~BFont()">
			<h3>~BFont();</h3>
			<p>Destroys font.</p>
		</div>
		<div id="setFamily(const BString&)">
			<h3>void setFamily(const BString& family);</h3>
			<p>Family can be full path eg "E;/BWE/bin/font/times.ttf" or just family name eg "times", family is invalid like "times.ttf".If you give the full path, then the same family font will be locate at only this path.</p>
		</div>
		<div id="family()">
			<h3>const BString& family() const;</h3>
			<p>Get family of this font.</p>
		</div>
		<div id="setEncoding(Encoding)">
			<h3>bool setEncoding(Encoding encoding);</h3>
			<p>A font file contains several encoding format, you can choose the special one as current.</p>
		</div>
		<div id="encoding()">
			<h3>Encoding encoding() const;</h3>
			<p>Get the current encoding of font.</p>
		</div>
		<div id="encodingCount()">
			<h3>int encodingCount() const;</h3>
			<p>Get the number of this family encoding list.</p>
		</div>
		<div id="encoding(int)">
			<h3>Encoding encoding(int index) const;</h3>
			<p>Get the indexed encoding in the family encoding list.</p>
		</div>
		<div id="setSize(int)">
			<h3>void setSize(int size);</h3>
			<p>Set font size.</p>
		</div>
		<div id="size()">
			<h3>int size() const;</h3>
		</div>
		<div id="setBold(bool)">
			<h3>void setBold(bool enable);</h3>
			<p>If this font family has bold data, this method works.</p>
		</div>
		<div id="bold()">
			<h3>bool bold() const;</h3>
			<p>Get font bold value.</p>
		</div>
		<div id="setItalic(bool)">
			<h3>void setItalic(bool enable);</h3>
		</div>
		<div id="italic()">
			<h3>bool italic() const;</h3>
		</div>
		<div id="setUnderline(bool)">
			<h3>void setUnderline(bool enable);</h3>
		</div>
		<div id="underline()">
			<h3>bool underline() const;</h3>
		</div>
		<div id="setSpaceSize(int)">
			<h3>void setSpaceSize(int spaceSize);</h3>
		</div>
		<div id="spaceSize()">
			<h3>int spaceSize() const;</h3>
		</div>
		<div id="setTabSize(int)">
			<h3>void setTabSize(int tabSize);</h3>
			<p>Tab size is number of font size.</p>
		</div>
		<div id="tabSize()">
			<h3>int tabSize() const;</h3>
		</div>
		<div id="setBitmap(BCode, BImage*)">
			<h3>void setBitmap(BCode code, BImage* bitmap);</h3>
			<p>Set the code image to cover the original font image.</p>
		</div>
		<div id="bitmap(BCode)">
			<h3>BImage* bitmap(BCode code);</h3>
			<p>Get font image of the code.</p>
		</div>
		<div id="bitmap(BCode)">
			<h3>const BImage* bitmap(BCode code) const;</h3>
		</div>
		<div id="setGlyph(BCode, BGlyph*)">
			<h3>void setGlyph(BCode code, BGlyph* glyph);</h3>
			<p>Set the code glyph to cover the original font glyph. Glyph is a polygon of font code.</p>
		</div>
		<div id="glyph(BCode)">
			<h3>BGlyph* glyph(BCode code);</h3>
		</div>
		<div id="glyph(BCode)">
			<h3>const BGlyph* glyph(BCode code) const;</h3>
		</div>
		<div id="codeSize(BCode)">
			<h3>BSize codeSize(BCode code) const;</h3>
			<p>Get code size in this font.</p>
		</div>
		<div id="codeWidth(BCode)">
			<h3>int codeWidth(BCode code) const;</h3>
		</div>
		<div id="codeHeight(BCode)">
			<h3>int codeHeight(BCode code) const;</h3>
		</div>
		<div id="textSize(const BString&)">
			<p/><a/>
			<h3>BSize textSize(const BString& text) const;</h3>
			<p>Return the text size in this font, '\n' will expand height to next line.</p>
		</div>
	</body>
</html>